package mq_demo;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@RequiredArgsConstructor
@Component
@Slf4j
public class Consumer {

//    private final ICodeService codeService;
//
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue(name = "qa.email.queue", durable = "true"),
//            exchange = @Exchange(name = MqConstants.Exchange.SMS_EXCHANGE, type = ExchangeTypes.TOPIC),
//            key = MqConstants.Key.SMS_MESSAGE
//    ))
//    public void sendEmail(EmailMessage emailMessage){
//        log.info("你接受了数据好吓人;{},{}",emailMessage.getEmail(),emailMessage.getPrefix());
//        codeService.sendVerifyCode(emailMessage.getEmail(),emailMessage.getPrefix());
//    }
}
